from kivy.lang import Builder
from kivy.properties import ObjectProperty, StringProperty

from goblinoid.root.goblinscreen import GoblinScreenWithPrevious

Builder.load_file('goblinoid/profile/profilescreen.kv')


class ProfileScreen(GoblinScreenWithPrevious):
    profile_service = ObjectProperty(None)
    username = StringProperty()

    def __init__(self, profile_service, **kwargs):
        super(ProfileScreen, self).__init__(**kwargs)
        self.profile_service = profile_service
        self.username = profile_service.get_username()
